import { Controller, Get } from "@nestjs/common";
import { MovieService } from "./movie.service";
import {data as DjJson} from "./dj"

@Controller("movie")
export class MovieController {
  constructor(
    private readonly movieService: MovieService
  ) {}
  
  @Get("dj/json")
  getDj() {
    return DjJson.props.pageProps.dehydratedState.queries[0].state.data.seasonInfo.mediaInfo.episodes.map(item => {
      // return item
      return {link: item.link, bvid: item.bvid, title: item.playerEpTitle, cmd: `BBDown ${item.bvid} -tv`}
    })
  }

}